<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="LoginServlet">
<table>
     <tr><td>账号：<input type="text" name="name" size="20"></td></tr>
     <tr><td>密码：<input type="password" name="pwd" size="20"></td></tr>
</table>
<%
     //获得错误信息
     String errorMsg=(String)request.getAttribute("errorMsg");
     if(errorMsg!=null){
    	 out.println(errorMsg);
     }
%>
<input type="submit" value="登陆" size="4">
<a href="reg.jsp">注册</a>
</form>
</body>
</html>